/**
 * 
 */
package com.bolbachchan.blog.dao.posts;

import java.util.List;

import com.bolbachchan.blog.dto.PostDTO;
import com.bolbachchan.blog.hibernate.domain.Posts;

/**
 * @author Chaitanya
 * 
 */
public interface UserPostsDAO {

    /*
     * Named Queries
     */
    public static final String GET_POSTS_BY_USER_ID = "getPostsByUserId";
    public static final String GET_POST_BY_POST_ID = "getPostByPostId";
    public static final String UPDATE_POST = "updatePost";

    /*
     * Query parameters
     */
    public static final String OBJ_ID = "objId";
    public static final String USER_OBJ_ID = "userObjId";
    public static final String POST_TITLE = "postTitle";
    public static final String POST_CONTENT = "postContent";
    public static final String CREATE_DT = "createDt";
    public static final String UPDATE_DT = "updateDt";

    /**
     * @param dto
     */
    @Deprecated
    public void saveNewPost(PostDTO dto);

    /**
     * @param dto
     */
    @Deprecated
    public void updatePost(PostDTO dto);

    /**
     * @param dto
     * @return
     */
    @Deprecated
    public List<Posts> getPostsByUserId(PostDTO dto);

    /**
     * @param objId
     * @return
     */
    public Posts getPostByPostId(int objId);

    /**
     * @param post
     */
    public void saveNewPost(Posts post);

    /**
     * @param post
     */
    public void updatePost(Posts post);

    /**
     * @param userId
     * @return
     */
    public List<Posts> getPostsByUserId(int userId);
}
